// types/rs/User.ts
export interface User {
  id: number
  account: string
  name: string
  password?: string
  sex: 1|2
  company: string
  roles: Role[]
  rids?: number[]
  is_delete: 0|1
  createDate: string
  createUser: string
  updateDate: string
  updateUser: string
}

export interface UserForm {
  id?: number
  account: string
  name: string
  password?: string
  sex: 1|2
  company: string
  rids: number[] 
}


export interface UserQuery {
  account?: string
  name?: string
}
export interface Role {
  id: number;
  name: string;
  permissions: Permission[];
  departments: Department[];
  pids: number[]; 
  dids: number[];  
  is_delete: 0 | 1;
  createDate: string;
  createUser: string;
  updateDate: string;
  updateUser: string;
}

export interface Permission {
  id: number
  name: string
  purl: string
  is_delete: 0 | 1
  createDate: string
  createUser: string
  updateDate: string
  updateUser: string
}
export interface Department {
  id: number
  name: string
  is_delete: 0 | 1
  createDate: string 
  createUser: string
  updateDate: string
  updateUser: string
}